/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

    
function toUrlParams(json){
    var params  = Object.keys(json).map(function (key) {
        // body...        
        return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]);
        
    }).join("&");
    return params;
}

